size <- read.table("NC0001.trim_mm2_norepeat_nostrip.contigs_SOAP.out.5_summary_sizes",header=T,sep="\t",row.names=1)
pdf("NC0001.trim_mm2_norepeat_nostrip.5prime.contigs.pdf")
barplot(t(size),xlab="Read Length", ylab="Total # Reads", main="N.crassa unique smallRNA reads by size 5'base",space=0.1,cex.axis=0.8,las=1,cex=0.8,names=size$V1,legend=T,col=rainbow(5, start=.1, end=.91),beside=F)

size <- read.table("NC0001.trim_mm2_norepeat_nostrip.contigs_SOAP.out.3_summary_sizes",header=T,sep="\t",row.names=1)
pdf("NC0001.trim_mm2_norepeat_nostrip.3prime.contigs.pdf")
barplot(t(size),xlab="Read Length", ylab="Total # Reads", main="N.crassa uniquesmallRNA reads by size 3'Base",space=0.1,cex.axis=0.8,las=1,cex=0.8,names=size$V1,legend=T,col=rainbow(5, start=.1, end=.91),beside=F)

# percent unique
size <- read.table("NC0001.trim_mm2_norepeat_nostrip.contigs_SOAP.out.5_summary_sizes.percent",header=T,sep="\t",row.names=1)
pdf("NC0001.trim_mm2_norepeat_nostrip.5prime.percent.contigs.pdf")
barplot(t(size),xlab="Read Length", ylab="Percentage of Reads", main="N.crassa unique smallRNA reads by size 5'base",space=0.1,cex.axis=0.8,las=1,cex=0.8,names=size$V1,legend=T,col=rainbow(5, start=.1, end=.91),beside=F)

size <- read.table("NC0001.trim_mm2_norepeat_nostrip.contigs_SOAP.out.3_summary_sizes.percent",header=T,sep="\t",row.names=1)
pdf("NC0001.trim_mm2_norepeat_nostrip.3prime.percent.contigs.pdf")
barplot(t(size),xlab="Read Length", ylab="Percentage of Reads", main="N.crassa unique smallRNA reads by size 3'Base",space=0.1,cex.axis=0.8,las=1,cex=0.8,names=size$V1,legend=T,col=rainbow(5, start=.1, end=.91),beside=F)



size <- read.table("NC0001.trim_mm2_repeat_strip.contigs_SOAP.out.3_summary_sizes",header=T,sep="\t",row.names=1)
pdf("NC0001.trim_mm2_repeat_strip.3prime.contigs.pdf")
barplot(t(size),xlab="Read Length", ylab="Total # Reads", main="N.crassa Reads with to Genome 3' base",space=0.1,cex.axis=0.8,las=1,cex=0.8,names=size$V1,legend=T,col=rainbow(5, start=.1, end=.91),beside=F)

size <- read.table("NC0001.trim_mm2_repeat_strip.contigs_SOAP.out.5_summary_sizes",header=T,sep="\t",row.names=1)
pdf("NC0001.trim_mm2_repeat_strip.5prime.contigs.pdf")
barplot(t(size),xlab="Read Length", ylab="Total # Reads", main="N.crassa Reads with to Genome 5' base",space=0.1,cex.axis=0.8,las=1,cex=0.8,names=size$V1,legend=T,col=rainbow(5, start=.1, end=.91),beside=F)

# percentage
size <- read.table("NC0001.trim_mm2_repeat_strip.contigs_SOAP.out.3_summary_sizes.percent",header=T,sep="\t",row.names=1)
pdf("NC0001.trim_mm2_repeat_strip.3prime.percent.contigs.pdf")
barplot(t(size),xlab="Read Length", ylab="Percentage of Reads", main="N.crassa Non-unique Reads with to Genome 3' base",space=0.1,cex.axis=0.8,las=1,cex=0.8,names=size$V1,legend=T,col=rainbow(5, start=.1, end=.91),beside=F)

size <- read.table("NC0001.trim_mm2_repeat_strip.contigs_SOAP.out.5_summary_sizes.percent",header=T,sep="\t",row.names=1)
pdf("NC0001.trim_mm2_repeat_strip.5prime.percent.contigs.pdf")
barplot(t(size),xlab="Read Length", ylab="Percentage of Reads", main="N.crassa Non-unique Reads with to Genome 5' base",space=0.1,cex.axis=0.8,las=1,cex=0.8,names=size$V1,legend=T,col=rainbow(5, start=.1, end=.91),beside=F)
